﻿using System.Windows.Controls;
using SilentWebsite.ViewModels.Windows;

namespace SilentWebsite.Views.Windows
{
    public partial class SignInChild
    {
        public SignInChild()
        {
            InitializeComponent();
            DataContext = new SignInViewModel(this);
        }

        private void LayoutRootOnBindingValidationError(object sender, ValidationErrorEventArgs e)
        {
            ToolTipService.SetToolTip(e.OriginalSource as TextBox,
                                      e.Action == ValidationErrorEventAction.Added ? e.Error.Exception : null);
        }
    }
}

